package com.mald.plugin.convert;

import com.mald.plugin.bean.DataNode;

import java.util.Vector;

public class DataConvertor {

    public static DataNode convert(String[] standardNameDataSplit) {
        DataNode dataNode = new DataNode();
        dataNode.setKey(standardNameDataSplit[0]);
        dataNode.setShortName(standardNameDataSplit[1]);
        dataNode.setFullName(standardNameDataSplit[2]);
        return dataNode;
    }

    public static Vector<String> convert(DataNode dataNode) {
        Vector<String> vector = new Vector<>();
        vector.add(0, dataNode.getKey());
        vector.add(1, dataNode.getShortName());
        vector.add(2, dataNode.getFullName());
        return vector;
    }
}
